﻿<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0, user-scalable=no" />
<title></title>
<link rel="shortcut icon" href="Images/ico/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link type="text/css" rel="stylesheet" href="/layui/css/layui.css"  media="all">
<script type="text/javascript" src="/layui/layui.js" charset="utf-8"></script>
<script src="/js/jquery.min.js" type="text/javascript"></script>
<script src="/js/xcity.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/layui-post.js"></script>
</head>
<body>
<header class="ng-scope" style="">
    <h4 class="title-order">
        <a class="title-top" href="javascript:window.history.back();"></a>
        <a class="title-center">客服反馈</a>
        <a class="title-right" href="/index"></a>
    </h4>
</header>
    <div class="ng-scope PB50" style="margin-top: 50px;">
        <img src="img/cs_001.jpg" class="img-responsive" alt="">
        <div class="borderleft5o">在线留言<span> (12小时内回复)</span></div>
        <form class="layui-form layui-form-pane">
            <div class="comment-box">
                <div class="box">
                    <label>您的姓名：</label>
                    <input  lay-verify="required" name="userName" class="aui-Address-box-input" type="text" placeholder="您的姓名" />
                </div>
                <div class="box">
                    <label>手机号码：</label>
                    <input lay-verify="required|phone" name="telPhone" class="aui-Address-box-input" type="number" placeholder="手机号码" />
                </div>
                <div class="box">
                    <label>留言内容：</label>
                    <textarea lay-verify="required" name="ideas" class="aui-Address-box-textarea" placeholder="留言内容"></textarea>
                </div>
                <div class="box" lay-submit="" lay-filter="add">
                    <div style="text-align:center;"><a href="javascript:;" class="btnSubmit" style="line-height: 30px;border-radius:10px;">提 交</a></div>
                </div>
            </div>
        </form>
    </div>
</body>
<script type="text/javascript">
$.ajaxSetup({contentType: "application/json; charset=utf-8"});
var userInfo = $.parseJSON(sessionStorage.getItem("userInfo"));
layui.use(['form','layer',], function(){
    layui.form.on('submit(add)', function(data){
        data.field.userId = userInfo.userId;
        $.post("/cateringFeedback/insert",JSON.stringify(data.field),function(res){
            if(res.success) layer.msg(res.msg,{icon:1,time:1500},function(){
                window.location.reload()
            });
        })
    })
});
</script>
</html>
